/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.tom.social.fetcher;

import org.openide.modules.ModuleInstall;
import org.openide.windows.WindowManager;
import pl.tom.social.fetcher.jade.LocalJade;

/**
 * Manages a module's lifecycle. Remember that an installer is optional and
 * often not needed at all.
 */
public class Installer extends ModuleInstall {

	@Override
	public void restored() {
		WindowManager.getDefault().invokeWhenUIReady(new Runnable() {

			public void run() {
				LocalJade.getInstance().connectToMainContainer();
			}
		});
	}

	@Override
	public boolean closing() {
		LocalJade.getInstance().stopJade();
		return true;
	}
}
